import { defineStore } from 'pinia'
import { locale } from '@/i18n'

export const useGlobyStory = defineStore(
  'GlobyStory',
  () => {
    const language = ref(locale)
    function setLanguage(lang: string) {
      language.value = lang
    }

    return { language, setLanguage }
  },
  {
    persist: {
      storage: sessionStorage
    }
  }
)
